﻿using System;
public interface IBindesh
{
    string encode(string str);
    string decode(string str);
}

namespace FanTong
{
    /// <summary>
    /// Summary description for EncryptionDecryption.
    /// </summary>
    public class EncryptionDecryption : IBindesh
    {
        public string encode(string str)
        {
            string htext = ""; // blank text

            for (int i = 0; i < str.Length; i++)
            {
                htext = htext + (char)( str[i] + 10 - i * 2);
            }
            return htext;
        }

        public string decode(string str)
        {
            string dtext = "";

            for (int i = 0; i < str.Length; i++)
            {
                dtext = dtext + (char)(str[i] - 10 + i * 2);
            }
            return dtext;
        }
    }
}